Video Compression Formats

What is video compression and why do we need it? A little background information is in order. A single 640 x 480 true color picture requires ( 640 x 480 x 3 bytes per pixel =) 921,600 uncompressed bytes. That is a big file to download. That is why compressed graphics formats such as jpeg and gif are so popular on the web. Video/animation has a frame rate of so many still pictures per second. Television is 30 fps (frames per second) while movies are 24 fps. Most cd-rom movies are 15 fps. One second of uncompressed video would require about 30 MB of disk space (30 fps x 921,600 bytes per frame). For today's PCs 5 MBs per second data throughput rates is considered fast. With the web, we have an even more significant problem. The table below compares several data rates. This table was originally published in the February 1997 issue of DV in an article by Charles White entitled "VideoCompression Formats Explained". Much of my information is also from that article.

Comparison of Data Rates
14.4 modem1.8KB per second
28.8 modem3.6KB per second
ISDN Dual Connection16KB per second
T1 Line100KB per second
1X CD-ROM150KB per second
4X CD-ROM600KB per second

So what are some simple ways to reduce the 30 MB/sec data rate down to something more reasonable. We can halve the frame rate to 15 fps. This is a bit slow and somewhat jerky but the data rate would be 15 MB/sec. If we reduce the picture size to 320 x 240, this would quarter the data rate to 3.75 MB/sec. This is about the best we can do without some sort of file compression.

JPEG is a compression scheme which has high compression capabilities with very good quality. It is the same compression that is applied to still images but instead is applied to each individual frame of a movie. The compression is lossy, that is, some data is lost from the images and can never be recovered. The compression can vary from 2:1 to 100:1. Two to one compression has excellent quality and is indistinguishable from no compression. 100:1 is actually ugly. A 6:1 compression is a good compromise between file size and image quality. You could use somewhat higher compressions for web usage as broadcast quality video is not the goal.

MPEG (Motion Picture Experts Group) builds on jpeg compression and adds interframe compression techniques. Jpeg compression stores a complete picture for each frame. Mpeg has 3 types of frames - I, P, and B. Key frames are I frames and are jpeg compressed. P frames are predicted frames and B frames are bi-directional frames. P frames hold only the data that has changed since the last I frame. B frames derive their information from the I frames that fall both before and after it. This means P and B frames are not complete pictures and need information from surrounding frames to get a complete picture. This works fine for video but linear editing programs have trouble editing frame by frame because of the incomplete frames.

MPEG-1 is designed for 352 x 240 30fps running at 170 kb/second. MPEG-2 is designed for 720 x 480 60 field video running at data rates from 500kb/sec to 2MB/sec. Even a T1 line only supports 100kb/sec. Clearly other compromises are needed for successful web based video.

Radius's Cinepak is a popular compression scheme for cd-rom usage. It was designed for 320 x 240 at 15 fps. It produces good quality movies. It takes a lot longer to compress than decompress Cinepak files.

Intel has recently developed Indeo video interactive 4.0 (IVI). This is a wavelet based lossy compression scheme. It has built-in scalability so fast and slow processors will both see complete movies without dropped frames. Faster processors will see better quality video.

Web base video is the ultimate test for video compression. A 1X cd-rom delivers 150kb/sec which is 40 times faster than a 28.8 modem. VDOLive uses a wavelet based compression which reduces image quality while maintaining frame rate. On a slow connection it will start to reduce the frame rate. Finally, it will drop the video altogether and just maintain audio. Streamworks by Xing is MPEG based. It will also drop the frame rate while maintaining audio. Fractal based Vivo's Software's VivoActive and Iterated Systems' Clearvideo will stop playing if there is not enough bandwidth.

So what does all of the above tell us. Video is extremely difficult to deliver across the internet. Make your movies/animations short. Keep the frame rates down and make the picture size as small as possible. Each movie or animation will have to be dealt with separately, with compromises to keep both the file size and quality adequate.